package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department {
	private Long id;
	private String name;
	private String sn;

	public String getJsonData(){
		Map<String,Object> data = new HashMap<>();
		data.put("id",this.getId());
		data.put("name",this.getName());
		data.put("sn",this.getSn());
		return JSON.toJSONString(data);
	}
}
